LightWave Scene File Format
LightWave v.4.0 June 1995
THIS DOCUMENT IS PRELIMINARY. THIS INFORMATION MAY NOT BE CORRECT,
MAY BE INCOMPLETE, OR MAY CHANGE AT ANYTIME.
Copyright ©1990 - 1995 NewTek, Inc.
Confidential and Proprietary. All rights reserved.
WARNING!
The information contained herein is subject to change without
notice. NewTek, Inc. specifically does not make any endorsement
or representation with respect to use, results, or performance of
the information (including without limitation its capabilities,
appropriateness, reliability, or availability).
DISCLAIMER
This information is provided "as is" without warranty of any
kind, either expressed or implied. The entire risk as to the
use of this information is assumed by the user. In no event
will NewTek, Inc. be liable for any damages, direct, indirect,
incidental, special or consequential, resulting from any defect
in the information.
TABLE OF CONTENTS
Chapter 1 SCENE FILE OVERVIEW
1.1 Basic Scene File Information
1.2 Scene File Sections
1.2.1 Order of Scene File Sections
1.2.2 Example Scene File Section
1.3 Keyframes
1.3.1 Basic Keyframe Information
1.3.2 Basic Object Segment
1.3.3 Expanded Basic Object Segment
1.3.4 Single Keyframe Description
1.3.5 Spline Control Values
1.4 Envelopes
1.4.1 Basic Envelope Information
1.4.2 List of Functions That Use Envelopes
1.4.3 Example Envelope
1.4.4 Expanded Envelope Structure
Chapter 2 SCENE SECTION
2.1 Scene Section Information
2.1.1 Scene Section Description
2.1.2 Example Scene Section
2.2 Scene Functions
2.2.1 Order of Scene Functions
2.2.2 Scene Function Descriptions
Chapter 3 OBJECT SECTION
3.1 Object Section Information
3.1.1 Object Section Description
3.1.2 Individual Object Segment
3.1.3 Example Object Section
3.2 Object Functions
3.2.1 Function Order
3.2.2 Function Descriptions
3.3 Object Skeleton
3.3.1 Object Skeleton Information
3.3.2 Example Object Segment with Bones
3.3.3 Object Skeleton Function Order
3.3.4 Object Skeleton Function Descriptions
3.4 Displacement Map / Clip Map
3.4.1 DisplacementMap/ClipMap Information
3.4.2 Example Object Segment with Displacement Map
3.4.3 Mapping Function Order
3.4.4 Mapping Function Descriptions
Chapter 4 LIGHT SECTION
4.1 Light Section Information
4.1.1 Light Section Description
4.1.2 Individual Light Segment
4.2 Light Functions
4.2.1 Function Order
4.2.2 Function Descriptions
Chapter 5 CAMERA SECTION
5.1 Camera Section Information
5.1.1 Camera Section Description
5.1.2 Example Camera Segment
5.2 Camera Functions
5.2.1 Function Order
5.2.2 Function Descriptions
Chapter 6 EFFECTS SECTION
6.1 Effects Section Information
6.1.1 Effects Section Description
6.1.2 Basic Effects Section
6.2 Effects Functions
6.2.1 Function Order
6.2.2 Function Description
Chapter 7 RECORD SECTION
7.1 Record Section Information
7.1.1 Record Section Description
7.1.2 Basic Record Section
7.2 Record Functions
7.2.1 Function Order
7.2.2 Function Descriptions
Chapter 8 OPTIONS SECTION
8.1 Options Section Information
8.1.1 Options Section Description
8.1.2 Example Options Section
8.2 Options Functions
8.2.1 Function Order
8.2.2 Function Description
Chapter 1: SCENE FILE OVERVIEW
1.1 BASIC SCENE FILE INFORMATION
The LightWave scene file is a standard ASCII text file that contains the
information necessary to reconstruct a LightWave Scene.
In addition to the objects, lights and camera, the scene file contains
standard Layout settings that are set on a per scene basis. Layout
information that is more "permanent" is saved in the LightWave config
file. (For LightWave Config File information see Chapter 10.)
The object geometry is not included in the scene file. For each object
instance the objects path and filename are listed along with other scene
specific attributes. The objects are stored as seperate binary files
that contain the object geometry along with the objects surface attributes.
Objects are not saved when the Save Scene function is selected from the
Scene Menu. The user is required to save these by going to the Objects Menu
and selecting either the Save Object or Save All Objects function. This
saves each object as an individual file and sets the path and filename that
will be saved for that object instance in the scene file.
Values are listed to 6 decimal places.
Position values are given in meters.
Rotation values are given in degrees.
Scaling values are given as a multiplier.
Frame numbers are given as a value greater than or equal to 0.
Color values are given as an Red, Green, and Blue triple, each with a range
of 0 to 255.
1.2 SCENE FILE SECTIONS
1.2.1 Order Of Scene File Sections
The scene files basic structure is divided into separate logical sections.
Each section relates to a group of LightWave's functions. These sections
are arranged in an order similar to the menu structure in LightWave's Layout.
Scene
Objects
Lights
Camera
Effects
Render
Layout Options
1.2.2 Example Scene File Sections
LWSC
1
FirstFrame 1
LastFrame 30
FrameStep 1
FramesPerSecond 30.000000
AddNullObject NullObject
ShowObject 4 7
ObjectMotion (unnamed)
9
1
0 0 0 0 0 0 1 1 1
0 0 0 0 0
EndBehavior 1
ShadowOptions 7
AmbientColor 255 255 255
AmbIntensity 0.250000
AddLight
LightName Light
ShowLight 0 7
LightMotion (unnamed)
9
1
0 0 0 60 30 0 1 1 1
0 0 0 0 0
EndBehavior 1
LightColor 255 255 255
LgtIntensity 1.000000
LightType 0
ShadowCasting 1
ShowCamera 1 7
CameraMotion (unnamed)
9
1
0 0 -1 0 0 0 1 1 1
0 0 0 0 0
EndBehavior 1
ZoomFactor 3.200000
RenderMode 2
RayTraceEffects 0
Resolution 1
PixelAspectRatio 0
SegmentMemory 8800000
Antialiasing 0
AdaptiveSampling 1
AdaptiveThreshold 8
FilmSize 2
FieldRendering 0
MotionBlur 0
DepthofField 0
SolidBackdrop 1
BackdropColor 0 0 0
ZenithColor 0 40 80
SkyColor 120 180 240
GroundColor 50 40 30
NadirColor 100 80 60
FogType 0
DitherIntensity 1
AnimatedDither 0
DataOverlayLabel
ViewMode 3
ViewAimpoint 0.000000 0.000000 0.000000
ViewDirection 0.621337 -0.254818 0.000000
ViewZoomFactor 3.200000
LayoutGrid 8
GridSize 1.000000
ShowMotionPath 1
ShowSafeAreas 0
ShowBGImage 0
ShowFogRadius 0
ShowRedraw 0
1.3 KEYFRAMES
1.3.1 Basic Keyframe Information
A major part of the scene file consists of the motion paths of the Objects,
Lights and the Camera. The keyframe information provides the motion values
needed to reproduce a motion path.
Keyframes provide the following information:
Position (X, Y, Z)
Rotation (Heading, Pitch, Bank)
Scaling (XScale, YScale, ZScale)
Frame Number
Linear Value (Curved, Linear)
Spline Adjustments (Tension, Continuity, Bias)
Values are listed to 6 decimal places.
Position values are given in meters.
Rotation values are given in degrees.
Scaling values are given as a multiplier
Frame numbers are given as a value greater than or equal to 0.
Each instance of an object, light, or camera is required to have at least
one keyframe at frame 0. This keyframe cannot be deleted from the scene file.
Motions can be saved as separate motion files using the Save Motion
function from the Motion Graph. This allows the copying of motions
from scene file to scene file and object to object. (For the Motion File
Format see Chapter 9.)
1.3.2 Basic Object Segment
The keyframes of an example object section are shown below:
LoadObject Objects/Tutorial/LightBeam.obj
ShowObject 4
ObjectMotion (unnamed)
9
2
-1.855599 1.543649 2.164339 -90.000000 360.000000 720.000000 1.0
1.0 1.0 0 0 1.0 0.0 0.0
-1.321534 2.235439 2.164330 -60.000000 360.000000 180.000000 1.0
1.0 1.0 15 0 1.0 0.0 0.0
EndBehavior 1
ShadowOptions 7
1.3.3 Expanded Basic Object Segment: (line-by-line description)
Below is an expanded line-by-line description of the above object segment:
LoadObject Objects/Tutorial/LightBeam.obj
Load Object function followed by object path name.
ObjectMotion (unnamed) Object motion identifier.
9 Number of Information channels per keyframe.
2 Number of Keyframes to be listed.
-1.855599 1.543649 2.164339 -90.000000 360.000000 720.000000
1.0 1.0 1.0 0 0 1.0 0.0 0.0
Keyframe Information.
-1.321534 2.235439 2.164330 -60.000000 360.000000 180.000000
1.0 1.0 1.0 15 0 1.0 0.0 0.0
Additional Keyframe.
EndBehavior 1 End Behavior of the object's motion.
Shadow Options 7 Shadow options for the object.
1.3.4 Single Keyframe Description
-1.321534 2.235439 2.164330 -60.000000 360.000000 180.000000
1.0 1.0 1.0 15 0 1.0 0.0 0.0
The values are listed as follows:
1st Line:
XPosition, YPosition, ZPosition, Heading, Pitch, Bank
2nd Line:
XScale, YScale, ZScale, FrameNumber, Linear Value, Tension, Continuity, Bias
1.3.5 Spline Control Values
Linear Value: 0 - Curved Spline
1 - Linear Path
Tension: -1.0 <= T <= 1.0
Continuity: -1.0 <= C <= 1.0
Bias: -1.0 <= B <= 1.0
1.4 ENVELOPES
1.4.1 Basic Envelope Information
Envelopes are used to change function values over time.
When an envelope is used, the function's numeric value is replaced by an
envelope segment identifier. This is denoted by: (envelope)
Envelopes set a single numeric value for a function (percentage, angle, etc.)
Percentages are listed between 0 and 1 with 0% = 0.000000 100%= 1.000000,
some function values are capable of going above 100%.
Values are listed to six decimal places.
Angles are given in degrees.
Distances are given in meters.
All Envelopes end with a local EndBehavior option.
1.4.2 List of Functions That Use Envelopes
Name - Type Function Listing
Displacement Map - % DisplacementMap
Metamorph Level - %: Metamorph
Object Dissolve - %: ObjDissolve
Polygon Size - %: PolygonSize
Global Flare Intensity - %: GlobalFlareIntensity
Ambient Intensity - %: AmbIntensity
Light Intensity - %: LgtIntensity
Flare Intensity - %: FlareIntensity
Flare Dissolve - %: FlareDissolve
Flare Rotation Angle - Angle: FlareRotationAngle
IntensityFalloff - %: Falloff
Spotlight Cone Angle - Angle: ConeAngle
Spot Soft Edge Angle - Angle: EdgeAngle
Shadow Map Angle - Angle: ShadowMapAngle
Zoom Factor - Focal Length: ZoomFactor
Blur Length - %: BlurLength
Focal Distance - Distance: FocalDistance
Lens F-stop - Aperture Size: LensFStop
Foreground Dissolve - %: FGDissolve
Minimum Fog Distance - Distance: FogMinDist
Maximum Fog Distance - Distance: FogMaxDist
Minimum Fog Amount - %: FogMinAmount
Maximum Fog Amount -%: FogMaxAmount
Color Saturation -%: Saturation
Glow Intensity - %: GlowIntensity
Glow Radius - Pixels: GlowRadius
1.4.3 Example Envelope:
LgtIntensity (envelope)
1
4
0.235000
0 0 0.0 0.0 0.0
0.800000
11 0 0.0 0.0 0.0
0.260000
22 0 0.0 0.0 0.0
0.650000
41 0 0.0 0.0 0.0
EndBehavior 1
1.4.4 Expanded Envelope Structure: (line-by-line description)
LgtIntensity (envelope) Envelope Function name followed by envelope
section identifier.
1 Number of Information Channels: envelopes contain percentage
values only.
4 Number of Keyframes in the envelope.
0.235000 Envelope Value. (23.5%)
0 0 0.0 0.0 0.0
Frame Number, Linear Status, Tension, Continuity, Bias
0.800000 Envelope Value. (80%)
11 0 0.0 0.0 0.0
Frame Number, Linear Status, Tension, Continuity, Bias
0.260000
22 0 0.0 0.0 0.0
Additional Keyframes.
0.650000
41 0 0.0 0.0 0.0
EndBehavior 1 End Behavior for this envelope.
Chapter 2: SCENE SECTION
2.1 SCENE SECTION INFORMATION
2.1.1 Scene Section Description
The Scene Section consists of the LightWave scene file header and frame
information. The functions in this section always produce a listing
and have no optional functions.
2.2.2 Example Scene Section
Below is an example Scene Section:
LWSC
1
FirstFrame 1
LastFrame 30
FrameStep 1
FramesPerSecond 30.000000
2.2 SCENE FUNCTIONS
2.2.1 Order of Scene Functions
The following scene functions are listed in the order in which they appear
in the scene file.
Italicized entries denote function labels and are not true function names.
LWSC
Scene File Version
FirstFrame
LastFrame
FrameStep
FramesPerSecond
2.2.2 Scene Function Descriptions
LWSC
The LightWave scene file begins with the LWSC header.
Scene File Version <1>
The second listing is the version of the scene file.
FirstFrame
example: FirstFrame 1
The FirstFrame function provides the starting frame for the rendering process.
This is a global function for all LightWave functions that use frame
information
LastFrame
example: LastFrame 30
The LastFrame function provides the last frame to be rendered. This also
supplies the defaults for the MakePreview function and the current frame
slider from Layout with the last frame information. This is a global
function for all LightWave functions that use frame information.
FrameStep
example: FrameStep 1
The FrameStep function provides the number of frames to increment between
rendered frames during the rendering process.
FramesPerSecond
example: FramesPerSecond 30.000000
The FramesPerSecond function provides the number of frames per second.
Chapter 3: OBJECT SECTION
3.1 OBJECT SECTION INFORMATION
3.1.1 Object Section Description
The Object section contains the information for all objects and object
related functions in a LightWave Scene.
The LightWave scene file does not contain the object geometry or the
surface information for its objects. This information is located in
object files that are saved separately from the scene.
Multiple Objects in an Object Section are listed sequentially in the order
in which they were loaded/created.
Duplicate objects are given a numbered suffix to the name during the
loading process. This number is enclosed in parenthesis and follows the
object name. An example: LightBeam.lwo (2) is the second instance of
the LightBeam.lwo object. The number is not saved in the scene file,
and is used only as a user reference.
The Target, Parent, and Goal functions use a value that is equal to the
order in which the referenced object was loaded. i.e. The value in the
function "ParentObject 3" means that the current object is parented to
the third object instance in the scene file.
3.1.2 Individual Object Segment
An Object Segment is required for each object instance in a scene file.
Object Segments are listed in the order in which the object was
loaded/created in the LightWave Scene.
The following functions are listed for each object instance.
(See Sections 3.2 and 3.3 for full descriptions)
LoadObject ¦ AddNullObject NullObject
ShowObject
ObjectMotion (unnamed) (Identifier Only)
Number of Information Channels
Number of Keyframes
Keyframe Information
EndBehavior
ShadowOptions
Additional functions are listed in the scene file as they are activated by
the user.
(See Sections 3.2 and 3.3 for full descriptions)
3.1.3 Example Object Section
The following Object Section contains two objects.
Preceding Scene Section........
LoadObject Objects/Tutorial/LightBeam.lwo
ShowObject 4 7
ObjectMotion (unnamed)
9
2
-1.855599 1.543649 2.164339 -90.000000 360.000000 720.000000
1.0 1.0 1.0 0 0 1.0 0.0 0.0
-1.321534 2.235439 2.164330 -60.000000 360.000000 180.000000
1.0 1.0 1.0 15 0 1.0 0.0 0.0
EndBehavior 1
ShadowOptions 7
AddNullObject Null
ShowObject 4 7
ObjectMotion (unnamed)
9
1
0 0 0 0 0 0 1 1 1
0 0 0 0 0
EndBehavior 1
ShadowOptions 7
Additional Scene Listings............
3.2 OBJECT FUNCTIONS
3.2.1 Function Order
The following object functions are listed in the order in which they appear
in the scene file.
Functions denoted with an asterisk (*) are required for all object instances.
Italicized entries denote function labels and are not true function names .
Indented entries denote an optional function of the preceding function.
LoadObject [AddNullObject] *
ShowObject *
ObjectMotion (identifier) *
Number of Information Channels *
Number of Keyframes *
Keyframe information *
EndBehavior *
LockedChannels
HLimits
PLimits
BLimits
PivotPoint
ParentObject
GoalObject
IKAnchor
Object Skeleton (see Section 3.3)
Metamorph
MorphTarget
MorphSurfaces
DisplacementMap (see Section 3.4)
ClipMap (see Section 3.4)
ObjDissolve
DistanceDissolve
MaxDissolveDistance
PolygonSize
Particle/Line Size
UnaffectedByFog
ObjPolygonEdges
ObjEdgeColor
UnseenByRays
ShadowOptions *
3.2.2 Function Descriptions
The following object functions are listed in the order in which they appear
in the scene file.
LoadObject